import { pubRequire } from '@utils/public'
const baseUrl = '/works'
// 获取列表
export function getSearchList(params, callBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/reviews/contents`,
    params,
    callBack,
    errBack
  )
}
// 单个公开展示
export function publicSingleAPI(id, params, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/reviews/contents/${id}/public`,
    params,
    callBack,
    errBack
  )
}
// 多个公开展示
export function publicMultAPI(params, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/reviews/contents/public`,
    params,
    callBack,
    errBack
  )
}
// 单个主页展示
export function personalSingleAPI(id, params, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/${id}/reviews/contents/personal`,
    params,
    callBack,
    errBack
  )
}
// 多个主页展示
export function personalMultAPI(params, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/reviews/contents/personal`,
    params,
    callBack,
    errBack
  )
}
// 不通过单个
export function failSingleRequestAPI(id, params, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/${id}/reviews/contents/unpass`,
    params,
    callBack,
    errBack
  )
}
// 不通过多个
export function failMultRequestAPI(params, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/reviews/contents/unpass`,
    params,
    callBack,
    errBack
  )
}
// 删除单个
export function deleteRequestAPI(id, params, callBack, errBack) {
  return pubRequire(
    'delete',
    `${baseUrl}/${id}/reviews/contents`,
    params,
    callBack,
    errBack
  )
}
